package com.log.james.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface DestPortAnalysisDao {

    /**
     * 获取特定时间段的端口异常的数据
     * @param starttime
     * @param destip
     * @param destport
     * @return
     */
    @Select("select * from fwlogevents where starttime=#{st} and destip=#{destip} and destport=#{destport}")
    List<Map<String,Object>> getDestPort(@Param("st")Date starttime,@Param("destip") Long destip,@Param("destport") int destport);

    /**
     * 获取端口攻击的详细信息
     */

    @Select("select * from destportanalysis where starttime=#{st} and destip=#{destip}")
    Map<String,Object> getPortAttackedDetails(@Param("st")Date st,@Param("destip")Long destip);
}
